# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
pkgname=eartag
pkgver=0.6.1
pkgrel=0
pkgdesc="Small and simple music tag editor that doesn't try to manage your entire library"
url="https://gitlab.gnome.org/World/eartag"
arch="noarch"
license="MIT"
depends="python3
	py3-gobject3
	gtk4.0
	libadwaita
	py3-magic
	py3-mutagen
	py3-pillow
	py3-pyacoustid
	"
makedepends="meson blueprint-compiler glib-dev desktop-file-utils"
checkdepends="appstream-glib py3-pytest"
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.gnome.org/World/eartag/-/archive/$pkgver/eartag-$pkgver.tar.gz
	add-developer-info.patch"

if [ "$CARCH" = "s390x" ]; then
	# test failure on s390x, likely caused by py3-magic, but only for
	# rarely-used .wma files
	options="!check"
fi

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
446bb7216bb3a774958aebb3a047d0b90afecae3fd2095f60027d4df68d286a706212d8367dbf1ea368f5fb1009ba9650fcaf998f27d8b9d1268c501fccff440  eartag-0.6.1.tar.gz
ad248292e244ebb80610d87833ddd182bbbf407793d336cb4a7516802800e51c58466afd41990cc6a713426412626db0b253886b70f16a258542220e44eedfaa  add-developer-info.patch
"
